package com.jdy.nettle.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 错误处理
 *
 * 错误统一处理实现
 */
@Controller
@RequestMapping("error")
public class BaseErrorController implements ErrorController {

    private static final Logger log = LoggerFactory.getLogger(BaseErrorController.class);

    @Override
    public String getErrorPath() {
        log.info("出错了！ 进入自定义的错误处理控制器");
        return "pages/common/error";
    }
}
